<html>
<head><meta charset="utf-8"><title>Should x.py check deny warnings? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html">Should x.py check deny warnings?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208407957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208407957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208407957">(Aug 29 2020 at 00:31)</a>:</h4>
<p>Do people find it more useful or more burdersome that <code>x.py check</code> denies warnings?  Is there some easy way I can configure it to allow warnings?</p>
<p>To be clear, we absolutely should deny warnings during <code>x.py test</code>, but, for exploratory hacking with <code>./x.py check</code>, I personally find that they slow me down :(</p>



<a name="208408276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208408276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208408276">(Aug 29 2020 at 00:38)</a>:</h4>
<p>I would prefer it not deny warnings for <code>check</code></p>



<a name="208408279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208408279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208408279">(Aug 29 2020 at 00:38)</a>:</h4>
<p>isn't there an option for that in config.toml?</p>



<a name="208408700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208408700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208408700">(Aug 29 2020 at 00:48)</a>:</h4>
<p>Aha, indeed, thanks!</p>
<div class="codehilite"><pre><span></span><code><span class="k">[rust]</span>
<span class="n">deny-warnings</span> <span class="o">=</span> <span class="kc">false</span>
</code></pre></div>



<a name="208430424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208430424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208430424">(Aug 29 2020 at 12:03)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> we also surface it on the CLI, IIRC --warnings=[deny|allow], but I might be getting that wrong</p>



<a name="208432770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208432770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208432770">(Aug 29 2020 at 13:01)</a>:</h4>
<p>Ooh, I wonder if that would let me allow warnings for <code>x.py build</code> :)</p>



<a name="208432818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208432818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208432818">(Aug 29 2020 at 13:02)</a>:</h4>
<p>The ones that annoy me most are unused imports, you have to scroll to the top of the file and they don't affect behavior at all</p>



<a name="208433679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208433679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208433679">(Aug 29 2020 at 13:20)</a>:</h4>
<p>I just never deny warnings locally</p>



<a name="208448293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208448293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208448293">(Aug 29 2020 at 18:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F/near/208433679">said</a>:</p>
<blockquote>
<p>I just never deny warnings locally</p>
</blockquote>
<p>same here</p>



<a name="208464015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208464015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208464015">(Aug 30 2020 at 02:05)</a>:</h4>
<p>it does seem weird this is on by default</p>



<a name="208464016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208464016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208464016">(Aug 30 2020 at 02:05)</a>:</h4>
<p>time for another MCP? <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>



<a name="208471941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208471941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208471941">(Aug 30 2020 at 06:50)</a>:</h4>
<p>it's on by default as that's what we want for CI... but maybe that's not a good argument.</p>



<a name="208483987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208483987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208483987">(Aug 30 2020 at 12:54)</a>:</h4>
<p>yeah, that was my same reasoning for changing <code>--stage 2</code> to be <code>--stage 1</code> by default, CI only has to change it once, but every new contributor has to change it when they're getting started</p>



<a name="208570745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208570745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208570745">(Aug 31 2020 at 15:14)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> yeah, I agree that MCP &amp; change this would make sense. </p>
<p>It's indeed the case that <code>x.py</code> used to be tweaked for "building  distribution/CI" case, and that "development" seems to be a much better default. </p>
<p>I wonder if we need to go meta here and to add a <code>config.ci.toml</code></p>



<a name="208570856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208570856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208570856">(Aug 31 2020 at 15:15)</a>:</h4>
<p>that would make sense I think, there were a <em>lot</em> of <code>--stage 2</code> args I had to add for the previous change haha</p>



<a name="208570920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208570920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208570920">(Aug 31 2020 at 15:15)</a>:</h4>
<p>and actually if we made the default stage configurable <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> could go back to having <code>x.py test</code> run <code>ui-fulldeps</code> as well</p>



<a name="208571153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208571153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208571153">(Aug 31 2020 at 15:17)</a>:</h4>
<p>(<a href="https://github.com/rust-lang/rust/pull/75404#issuecomment-672574511">https://github.com/rust-lang/rust/pull/75404#issuecomment-672574511</a>)</p>



<a name="208571787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208571787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208571787">(Aug 31 2020 at 15:19)</a>:</h4>
<p>and I could have <code>x.py doc</code> run stage 1 by default</p>



<a name="208571796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208571796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208571796">(Aug 31 2020 at 15:19)</a>:</h4>
<p>this sounds really nice</p>



<a name="208571852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208571852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208571852">(Aug 31 2020 at 15:20)</a>:</h4>
<p>(not exactly what you were suggesting though :P)</p>



<a name="208577164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208577164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208577164">(Aug 31 2020 at 15:58)</a>:</h4>
<p>deny-warnings can go in src/ci/run.sh where we have a bunch of configure flags already</p>



<a name="208577182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208577182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208577182">(Aug 31 2020 at 15:58)</a>:</h4>
<p>no need to add for each CI platform/config</p>



<a name="208577424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208577424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208577424">(Aug 31 2020 at 16:00)</a>:</h4>
<p>opened <a href="https://github.com/rust-lang/rust/issues/76165">https://github.com/rust-lang/rust/issues/76165</a></p>



<a name="208577529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208577529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208577529">(Aug 31 2020 at 16:00)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F/near/208577182">said</a>:</p>
<blockquote>
<p>no need to add for each CI platform/config</p>
</blockquote>
<p>this is actually exactly what 76165 is about, it would make stages configurable from one place as well :) instead of having to pass <code>--stage 2</code> for each and every x.py invocation</p>



<a name="208577607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208577607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208577607">(Aug 31 2020 at 16:01)</a>:</h4>
<p>it would still keep the <code>assert_eq!(top_stage, 2)</code> to make sure things are actually working</p>



<a name="208578557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20x.py%20check%20deny%20warnings%3F/near/208578557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20x.2Epy.20check.20deny.20warnings.3F.html#208578557">(Aug 31 2020 at 16:06)</a>:</h4>
<p>should be an easy thing to hook it up like deny-warnings is</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>